
package Componentes;


import com.toedter.calendar.JDateChooser;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Date;
import javax.swing.AbstractCellEditor;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;


public class DateEditor extends AbstractCellEditor implements TableCellEditor,ActionListener{
 
    protected Object valor="";
    

    public DateEditor() {
    }
    
    
    
   

    @Override
    public void actionPerformed(ActionEvent ae) {
       fireEditingStopped();
    }

    @Override
    public Object getCellEditorValue() {
        return this.valor;
    }
    
    @Override
   public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column){
        this.valor=value;
        return  new JDateChooser(Date.valueOf(""+value));

   }

  

}
